﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SportStore.Domain.Entities.Product>" %>
<div class="item">
    <h3>
        <%= Html.Encode(Model.Name) %></h3>
    <%= Html.Encode(Model.Description)%>
    <%using (Html.BeginForm("AddToCart", "Cart"))
      { %>
      <%= Html.HiddenFor(x=>x.ProductId) %>
      <%= Html.Hidden("returnUrl", Request.Url.PathAndQuery) %>
      <input type="submit" value="+ add to cart" />
    <%} %>
    <h4>
        <%= Html.Encode(Model.Price.ToString("c"))%></h4>
</div>
